<template>
	<view class="customer">
		<view>
			<form>
				<view class="title">
					反馈内容：
				</view>
				<view class="item">
					<view class="content">
						<textarea v-model="lbCustomerFeedback.content" style="padding:21rpx 0 0 25rpx"
							placeholder="输入反馈内容"></textarea>
					</view>
				</view>
				<view class="itemPhone">
					<input type="text"
					 v-model="lbCustomerFeedback.phone" 
					 style="height: 89rpx;line-height: 89rpx;padding-left: 25rpx;"
					 placeholder="输入联系电话" required disabled="true"/>
				</view>
			</form>
			<view class="remark" @click="submit">提交</view>
		</view>
        <view class="concatWay">
        <!-- 	<view class="QQ">
        		QQ:  {{ concatStyle.qq }}
        	</view> -->
			<view class="WX">
				WX:  {{ concatStyle.wx }}
			</view>
        </view>
	</view>
</template>
<script>
	import {
		sysConfig,
		customerFeedback
	} from "@/api/user";

    import store from "@/store/index.js"
	export default {
		name: "CustomerList",
		data() {
			return {
				concatStyle:{
					qq:'',
					wx:''
				},
				lbCustomerFeedback: {
					content: "",
					phone: ""
				}
			};
		},
		onLoad(){
			this.lbCustomerFeedback.phone = store.state.app.userInfo.phone
			this.getConcatWay();
		},
		methods: {
			// 联系方式获取
			getConcatWay(){
				sysConfig().then((res) => {
					this.concatStyle.qq = res.data.qq
					this.concatStyle.wx = res.data.wx
                  console.log("lxfs",res)
				}).catch((res) => {
					this.$util.Tips({
						title: res
					});
					uni.hideLoading()
				})
			},
			
			submit() {
				if (!this.lbCustomerFeedback.content) return this.$util.Tips({
					title: "请输入反馈内容"
				})
				customerFeedback(this.lbCustomerFeedback).then((res) => {
					uni.showToast({
						title:"提交成功",
						icon:"success"
					})
					setTimeout(()=>{
						uni.navigateBack()
					},2000)
				}).catch((res) => {
					this.$util.Tips({
						title: res
					});
				})
			}

		},
	}
</script>
<style lang="scss" scoped>
	page,
	body {
		height: 100%;
	}

	.customer {
		width: 100%;
		height: 100%;

		.title {
			margin: 74rpx 0 43rpx 45rpx;
			font-family: PingFang SC;
			font-weight: 400;
			font-size: 40rpx;
			color: #333333;
			line-height: 42rpx;
		}

		.item {

			.content {
				margin: 20rpx auto;
				width: 684rpx;
				background: rgba(255, 255, 255, 1);
				border-radius: 4rpx;

			}
		}

		.itemPhone {
			width: 684rpx;
			height: 89rpx;
			background: rgba(255, 255, 255, 1);
			border-radius: 4rpx;
			margin: 22rpx auto;
			
		}

		.remark {
			width: 684rpx;
			height: 88rpx;
			line-height: 88rpx;
			text-align: center;
			background: rgba(65, 136, 241, 1);
			box-shadow: 0rpx 9rpx 18rpx rgba(67, 136, 255, 1);
			border-radius: 44rpx;
			margin: 107rpx auto 0 auto;
			font-family: 59--Regular;
			font-size: 32rpx;
			color: #FFFFFF;
		}
	
	    .concatWay{
			margin-top: 120rpx;
			height: 200rpx;
			display: flex;
			justify-content: space-around;
			font-size: 33rpx;
			font-weight: bold;
		}
	}
</style>
